pub fn new_birthday_probability(n: u32) -> f64 {
    let days_in_year = 365.0;
    
    if n > days_in_year as u32 {
        return 1.0;
    }

    let mut probability_no_collision = 1.0;
    for i in 0..n {
        probability_no_collision *= (days_in_year - i as f64) / days_in_year;
    }

    let probability = 1.0 - probability_no_collision;
    
    (probability * 10000.0).round() / 10000.0
}
